package com.esunny.springboot.controller;

import com.esunny.springboot.service.impl.NewsManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/test")
@RestController
public class AController {

    @Autowired
    private NewsManagerImpl newsManager;

    @PostMapping("/b")
    public void function() {

        // new Thread(newsManager::update).start();   // ①
        newsManager.cacheTest();   // ②
    }
}
